<% @page_title = "Login to #{@oidc_provider.display_name} via OIDC"
@use_page_message = true
if (redirect_url = typecast_params.nonempty_str("redirect_url"))
  form_action = "?redirect_url=#{redirect_url}"
  button = "Connect"
  @page_message = "Connect your account on #{@oidc_provider.display_name}"
else
  button = "Login"
  @page_message = "Sign in to your account on #{@oidc_provider.display_name} using OpenID Connect"
end %>

<form action="<%= form_action %>" class="rodauth space-y-6" role="form" method="POST">
  <%== rodauth.csrf_tag %>

  <button
    class="flex w-full items-center justify-center gap-3 rounded-md bg-white px-3 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50"
    type="submit"
  >
    <span class="text-sm font-semibold leading-6"><%= button %></span>
  </button>
</form>
